package com.example.dto;

import com.example.model.dto.BaseDateDTO;
import com.example.validator.group.AddGroup;
import com.example.validator.group.UpdateGroup;
import jakarta.validation.constraints.*;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;

import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 原材料配置表
 *
 * @author yyyyjinying 1020066395@qq.com
 * @since 1.0-SNAPSHOT 2025-04-29
 */
@Data
@Schema(description = "原材料配置表")
public class RawMaterialsConfigDTO extends BaseDateDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    @Null(message = "{id.null}", groups = AddGroup.class)
    @NotNull(message = "{id.require}", groups = UpdateGroup.class)
    @Schema(description = "原材料配置的唯一标识符")
    private Long configId;
    @Schema(description = "菜品ID，关联到菜单表中的菜品")
    private Long dishId;
    @Schema(description = "原材料名称")
    private String materialName;
    @Schema(description = "原材料的规格，使用JSON格式存储")
    private Object materialSpecification;
    @Schema(description = "计量单位，如克、升、件等")
    private String unitOfMeasure;
    @Schema(description = "每单位菜品所需的原材料数量")
    private BigDecimal quantity;
    @Schema(description = "供应商ID，关联到供应商表")
    private Long supplierId;
    @Schema(description = "原材料应满足的质量标准")
    private String qualityStandard;
    @Schema(description = "原材料的单价")
    private BigDecimal costPerUnit;
    @Schema(description = "原材料的总成本，基于数量和单价计算得出")
    private BigDecimal totalCost;
    @Schema(description = "可替代的原材料列表，使用JSON格式存储")
    private Object alternativeMaterials;
    @Schema(description = "原材料的有效期或保质期")
    private Date expirationDate;
    @Schema(description = "关于原材料的任何附加说明或备注")
    private String notes;
    @Schema(description = "是否删除：1， 0")
    private Integer isDelete;

}